package add;


import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

import java.util.Arrays;
import java.util.Collection;

import static org.junit.Assert.assertEquals;


@RunWith(Parameterized.class)
public class Sj {
    private Add add =new Add();
    private String lign;
    private String pass;
    private boolean exp;
    @Parameterized.Parameters
    public static Collection userData(){
        return Arrays.asList(new Object[][]{
            {"Admin","123456",true},
            {"student","123456",false},
                {"admin","1236",false}
        });
    }
    public Sj(String lign,String pass,boolean exp){
        this.lign=lign;
        this.pass=pass;
        this.exp=exp;
    }
    @Test
    @Category(B.class)
    public void setExp(){
        System.out.println("b");
        assertEquals(exp,add.Log(lign,pass));


    }
}
